//
//  AxImKitHttpOptions.h
//  AxImKit
//
//  Created by xuxinhua on 2020/2/6.
//  Copyright © 2020 xuxinhua. All rights reserved.
//  网络请求参数配置
//

#import <Foundation/Foundation.h>

/**
 https认证模式
 */
typedef NS_ENUM(NSUInteger,AxImKitHttpSecurityModel) {
    AxImKitHttpSecurityModelIgnore = -1,//忽略证书
    AxImKitHttpSecurityModelDefault = 0,//默认
    AxImKitHttpSecurityModelOne = 1,//单向
    AxImKitHttpSecurityModelTwo = 2//双向
};

@interface AxImKitHttpOptions : NSObject<NSCopying,NSMutableCopying>

/**
 IP或域名
 */
@property (nonatomic,copy) NSString *domain;

/**
 端口
 */
@property (nonatomic,assign) int port;

/**
 请求超时时间(单位:秒)
 */
@property (nonatomic,assign) NSTimeInterval timeout;

/**
 是否开启https
 */
@property (nonatomic,assign,getter=isHttpTls) BOOL httpTls;

/**
 https认证方式
 */
@property (nonatomic,assign) AxImKitHttpSecurityModel httpSecurityModel;

/**
    1、忽略证书/默认不需要传以下证书信息
    2、单向认证，只需要传入cer证书路径
    3、双向认证，cere和p12证书都要传入
 
 
 */
/**
 cer证书路径
 */
@property (nonatomic,copy) NSString *httpCerPath;

/**
 p12证书路径
 */
@property (nonatomic,copy) NSString *httpP12Path;

/**
 p12证书密码
 */
@property (nonatomic,copy) NSString *httpP12Password;

@end


